package org.s63.config;

import org.s63.condition.LinuxConditional;
import org.s63.condition.WindowConditional;
import org.s63.service.LinuxListService;
import org.s63.service.ListService;
import org.s63.service.WindowListService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfig {
    @Bean
    @Conditional(WindowConditional.class)
    public ListService windowsListService() {
        return new WindowListService();
    }

    @Bean
    @Conditional(LinuxConditional.class)
    public ListService linuxListService() {
        return new LinuxListService();
    }
}
